/*
 * @Descripttion:
 * @version:
 * @Author: ChenXiang
 * @Date: 2021-04-06 09:39:31
 * @LastEditors: ChenXiang
 * @LastEditTime: 2021-04-11 01:20:44
 */
import React from "react";
import "./index.scss";
export default (props) => {
  const { icon, text, placeHolder = "请选择", style, right, onClick } = props;

  return (
    <div className="wrap" onClick={onClick}>
      <div
        className="vertical-center"
        style={{
          ...style
        }}
      >
        {/* left */}
        <div className="left">
          {icon && <img className="icon" src={icon} />}
          <p className="text">{text}</p>
        </div>
        {/* right */}
        <div className="right">
          <p className={right ? "value" : "placeHolder"}>
            {right || placeHolder}
          </p>
          <img
            className="icon"
            src=""
          />
        </div>
      </div>
    </div>
  );
};
